package com.lz.controller;

import com.lz.domain.FileVO;
import com.lz.service.FileUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.UUID;

/**
 * <pre>
 * @描述：
 * @作者：lizhao
 * @创建时间： 2024/8/25 上午11:37
 * </pre>
 **/
@RestController("/user")
public class UserController {
    @Autowired
    private FileUserService userService;

    @PostMapping("/uploadFile")
    public Object uploadFile( MultipartFile file) throws Exception {
      return   userService.uploadFile( file);
    }

    @RequestMapping("/getUser")
    public String getUser( @RequestParam("id") String id){
        System.out.println(id+"不可能为空吗");
        return "getUser";
    }
    @RequestMapping("/addUser")
    public String addUser(){
        return "addUser";
    }


}